import request from "@/utils/request";

//  查询企业的部门列表
export function departmentApi() {
  return request({
    url: "/company/department"
  });
}

//  /company/department/{id}
//根据ID修改部门详情
export function departmentEditApi(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: "PUT",
    data: data
  });
}

//获取员工简单列表
// export function departmentEditApi(id) {
//   return request({
//     url: `/company/department/${id}`
//   });
// }

//  新增部门

export function departmentAddApi(data) {
  return request({
    url: `/company/department`,
    method: "post",
    data: data
  });
}

//  根据ID删除部门

export function departmentDelApi(id) {
  return request({
    url: `/company/department/${id}`,
    method: "DELETE"
  });
}
